package ai.zixing.annotationexample;


public class Student {

    String name;
    Pen pen;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Pen getPen() {
        return pen;
    }

    public void setPen(Pen pen) {
        this.pen = pen;
    }

    public Student(String name, Pen pen) {
        this.name = name;
        this.pen = pen;
    }

    public Student() {

    }

    public Student(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", pen=" + pen +
                '}';
    }

    public String write() {
        return "Student Write with: " + pen.getRedPen();
    }
}
